package fun.yaozun.study.controller;

import fun.yaozun.study.controller.base.BaseController;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: yaozun
 * @Date: 2018/5/8 0008 17:58
 * @Description:
 */
@RestController
public class TestController extends BaseController{
    private static Logger log = LoggerFactory.getLogger(TestController.class);

    @ApiOperation(value = "测试1",notes = "测试1")
    @RequestMapping(value = "/test/test",method = RequestMethod.POST)
    public String test(String test,@RequestHeader String token){
        return "sdf";
    }

    @ApiOperation(value = "测试2",notes = "测试2")
    @RequestMapping(value = "/test/test",method = RequestMethod.GET)
    public String test2(){
        log.info("sdfsdf");
        log.error("错误");
        return "sdf";
    }

}
